package cn.edu.scau.cmi.zhangmingxing.singleton;
import java.math.*;
public class President {
	private static President instance;
	private String name;
	private int number;
	private President(String name) {
		this.name=name;
		this.number=(int)(100000+Math.random()*(900001));
	}
	public static President getInstance(String name) {
		if(instance==null&&!name.equals(null))
			instance =new President(name);
		return instance;
	}
	public String getname() {
		return name;
	}
	public int getnum() {
		return number;
	}

}
